package de.ludo.entities;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;

import de.ludo.gaming.PlayerType;

/**
 * 
 * @author L.Rother
 * 
 */
@Entity
public class Player {
	/**
	 * TODO Weitere Konstruktor zum Anlegen eines Künstlichen Intelligenz
	 */
	@Id
	private Integer sessionId;

	@Enumerated(EnumType.STRING)
	private PlayerType type;

	private int characterOne;

	private int characterTwo;

	private int characterThree;

	private int characterFour;

	boolean artifcialPlayer;

	private String playerName;

	public Player() {
		super();
	}

	public Player(LudoSession session, PlayerType type) {
		super();
		this.sessionId = session.getId();
		this.playerName = session.getUserName();
		this.type = type;
		this.characterOne = 0;
		this.characterTwo = 0;
		this.characterThree = 0;
		this.characterFour = 0;
		this.artifcialPlayer = false;
	}

	public Player(boolean aIPlayer, int sessionId) {
		this.sessionId = sessionId;
		this.characterOne = 0;
		this.characterTwo = 0;
		this.characterThree = 0;
		this.characterFour = 0;
		this.artifcialPlayer = true;
		this.type = PlayerType.PLAYER_RED;
	}

	public boolean isArtifcialPlayer() {
		return artifcialPlayer;
	}

	public void setArtifcialPlayer(boolean artifcialPlayer) {
		this.artifcialPlayer = artifcialPlayer;
	}

	public String getPlayerName() {
		return playerName;
	}

	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}

	public Integer getSessionId() {
		return sessionId;
	}

	public void setSessionId(Integer sessionId) {
		this.sessionId = sessionId;
	}

	public PlayerType getType() {
		return type;
	}

	public void setType(PlayerType type) {
		this.type = type;
	}

	public int getCharacterOne() {
		return characterOne;
	}

	public void setCharacterOne(int characterOne) {
		this.characterOne = characterOne;
	}

	public int getCharacterTwo() {
		return characterTwo;
	}

	public void setCharacterTwo(int characterTwo) {
		this.characterTwo = characterTwo;
	}

	public int getCharacterThree() {
		return characterThree;
	}

	public void setCharacterThree(int characterThree) {
		this.characterThree = characterThree;
	}

	public int getCharacterFour() {
		return characterFour;
	}

	public void setCharacterFour(int characterFour) {
		this.characterFour = characterFour;
	}

}
